package com.hw.springcloud.controller;

import com.hw.springcloud.entities.CommonResult;
import com.hw.springcloud.entities.Payment;
import com.hw.springcloud.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Classname: OrderController
 * @Description: 描述
 * @Date: 2021/12/17
 * @Author: HuWei
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/getById/{id}")
    public CommonResult<Payment> getById(@PathVariable("id") Long id) {
        return orderService.getById(id);
    }
}
